473,416 Members | 1,498 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,416 software developers and data experts.

Multicolumn Dropdown Menu - Error in IE

Hi Friends,
I Created one drop down menu by using CSS. It is perfect in Firefox but in IE it creates some problem.
in the header section the drop down menu appear,, below that i used one table to put one list menu box..

The problem is, when we mouse over the drop down menu , list box appears in front of the drop down area.. how can i tackle this . The Error occurs only in IE not in Firefox.
Expand|Select|Wrap|Line Numbers
  1.  
  2. Here the Code : For CSS
  3.  
  4. <style type="text/css">
  5. /* Root = Horizontal, Secondary = Vertical */
  6. ul#navmenu-h {
  7.   margin: 0;
  8.   border: 0 none;
  9.   padding: 0;
  10.   width: 600px; /*For KHTML*/
  11.   list-style: none;
  12. }
  13.  
  14. ul#navmenu-h li {
  15.     margin: 0;
  16.     border: 0 none;
  17.     padding: 0;
  18.     float: left; /*For Gecko*/
  19.     display: inline;
  20.     list-style: none;
  21.     position: relative;
  22.     width: 185px;  
  23.  
  24. }
  25.  
  26.  
  27. ul#navmenu-h ul {
  28.   margin: 0;
  29.   border: 0 none;
  30.   padding: 0;
  31.   width: 600px;
  32.   list-style: none;
  33.   display: none;
  34.   position: absolute;
  35.   top: 24px;
  36.   left: 0;
  37.  
  38. }
  39.  
  40. ul#navmenu-h ul:after /*From IE 7 lack of compliance*/{
  41.   clear: both;
  42.   display: block;
  43.   font: 1px/0px serif;
  44.   content: ".";
  45.   height: 0;
  46.   visibility: hidden;
  47. }
  48.  
  49. ul#navmenu-h ul li {
  50.   width: 300px;
  51.  
  52.   float: left; /*For IE 7 lack of compliance*/
  53.   display: block !important;
  54.   display: inline; /*For IE*/
  55. }
  56.  
  57. /* Root Menu */
  58. ul#navmenu-h a {
  59.   border: 1px solid #FFF;
  60.   border-right-color: #D6C7A7;
  61.   border-bottom-color: #D6C7A7;
  62.   text-align:left;
  63.   padding: 0 6px;
  64.   float: none !important; /*For Opera*/
  65.   float: left; /*For IE*/
  66.   display: block;
  67.   background: #F1ECE1;
  68.   color: #666;
  69.   font: bold 10px/22px Verdana, Arial, Helvetica, sans-serif;
  70.   text-decoration: none;
  71.   height: auto !important;
  72.   height: 1%; /*For IE*/
  73. }
  74.  
  75. /* Root Menu Hover Persistence */
  76. ul#navmenu-h a:hover,
  77. ul#navmenu-h li:hover a,
  78. ul#navmenu-h li.iehover a {
  79.   background: #D6C7A7;
  80.   color: #FFF;
  81.     text-align:left;
  82.  
  83. }
  84.  
  85. /* 2nd Menu */
  86. ul#navmenu-h li:hover li a,
  87. ul#navmenu-h li.iehover li a {
  88.   float: none;
  89.   background: #F1ECE1;
  90.   color: #666;
  91.  
  92.  
  93.  
  94. }
  95.  
  96. /* 2nd Menu Hover Persistence */
  97. ul#navmenu-h li:hover li a:hover,
  98. ul#navmenu-h li:hover li:hover a,
  99. ul#navmenu-h li.iehover li a:hover,
  100. ul#navmenu-h li.iehover li.iehover a {
  101.   background: #D6C7A7;
  102.   color: #FFF;
  103. }
  104.  
  105. /* 3rd Menu */
  106. ul#navmenu-h li:hover li:hover li a,
  107. ul#navmenu-h li.iehover li.iehover li a {
  108.   background: #F1ECE1;
  109.   color: #666;
  110. }
  111.  
  112. /* 3rd Menu Hover Persistence */
  113. ul#navmenu-h li:hover li:hover li a:hover,
  114. ul#navmenu-h li:hover li:hover li:hover a,
  115. ul#navmenu-h li.iehover li.iehover li a:hover,
  116. ul#navmenu-h li.iehover li.iehover li.iehover a {
  117.   background: #D6C7A7;
  118.   color: #FFF;
  119. }
  120.  
  121. /* 4th Menu */
  122. ul#navmenu-h li:hover li:hover li:hover li a,
  123. ul#navmenu-h li.iehover li.iehover li.iehover li a {
  124.   background: #F1ECE1;
  125.   color: #666;
  126. }
  127.  
  128. /* 4th Menu Hover */
  129. ul#navmenu-h li:hover li:hover li:hover li a:hover,
  130. ul#navmenu-h li.iehover li.iehover li.iehover li a:hover {
  131.   background: #D6C7A7;
  132.   color: #FFF;
  133. }
  134.  
  135. ul#navmenu-h ul ul,
  136. ul#navmenu-h ul ul ul {
  137.   display: none;
  138.   position: absolute;
  139.   top: 0;
  140.   left: 160px;
  141. }
  142.  
  143. /* Do Not Move - Must Come Before display:block for Gecko */
  144. ul#navmenu-h li:hover ul ul,
  145. ul#navmenu-h li:hover ul ul ul,
  146. ul#navmenu-h li.iehover ul ul,
  147. ul#navmenu-h li.iehover ul ul ul {
  148.   display: none;
  149. }
  150.  
  151. ul#navmenu-h li:hover ul,
  152. ul#navmenu-h ul li:hover ul,
  153. ul#navmenu-h ul ul li:hover ul,
  154. ul#navmenu-h li.iehover ul,
  155. ul#navmenu-h ul li.iehover ul,
  156. ul#navmenu-h ul ul li.iehover ul {
  157.   display: block;
  158. }
  159.  
  160. </style>
  161.  
  162. <script type="text/javascript">
  163. navHover = function() {
  164.     var lis = document.getElementById("navmenu-h").getElementsByTagName("LI");
  165.     for (var i=0; i<lis.length; i++) {
  166.         lis[i].onmouseover=function() {
  167.             this.className+=" iehover";
  168.         }
  169.         lis[i].onmouseout=function() {
  170.             this.className=this.className.replace(new RegExp(" iehover\\b"), "");
  171.         }
  172.     }
  173. }
  174. if (window.attachEvent) window.attachEvent("onload", navHover);</script>
  175.  
  176.  
  177.  
  178.   <table width="100%" border="0" cellspacing="0" cellpadding="0">
  179.     <tr>
  180.       <td align="center" valign="top"> <ul id="navmenu-h">
  181.  
  182.     <li><a href="#"> Top Songs &raquo;</a>
  183.         <ul> <li><a href="#">Song 1</a></li>
  184.           <li><a href="#"> Song 1</a></li>
  185.            <li><a href="#">Song 1</a></li>
  186.             <li><a href="#">Song 1</a></li>
  187.              <li><a href="#">Song 1</a></li>
  188.               <li><a href="#">Song 1</a></li>
  189.                <li><a href="#">Song 1</a></li>
  190.               <li><a href="#">Song 1</a></li>
  191.                  <li><a href="#">Song 1</a></li>
  192.                   <li><a href="#"> Song 1</a></li>
  193.                    <li><a href="#">Song 1</a></li>
  194.                     <li><a href="#">Song 1</a></li>
  195.                      <li><a href="#">Song 1</a></li>
  196.                       <li><a href="#">Song 1</a></li>
  197.                        <li><a href="#">Song 1</a></li>
  198.                         <li><a href="#">Song 1</a></li>                      
  199.                <li><a href="#">Top  REVIEW sites  &raquo;</a>
  200.               <ul>
  201.                 <li><a href="#"> REVIEW sites 1</a></li>
  202.                 <li><a href="#"> REVIEW sites 2</a></li>
  203.                 <li><a href="#"> REVIEW sites 3</a></li>
  204.                 <li><a href="#"> REVIEW sites 4</a></li>         
  205.               </ul>
  206.           </li>
  207.  
  208.  
  209.         </ul>
  210.     </li>
  211.  
  212.   </ul></td>
  213.     </tr>
  214.     <tr>
  215.       <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
  216.         <tr>
  217.           <td width="20%" align="left" valign="top">&nbsp;</td>
  218.           <td width="80%" align="left" valign="top"><form name="form1" method="post" action="">
  219.  
  220.             <select name="select">
  221.               <option>Top A - Z Songs</option>
  222.             </select>
  223.  
  224.                     </form>
  225.           </td>
  226.         </tr>
  227.       </table></td>
  228.     </tr>
  229.     <tr>
  230.       <td align="center" valign="top">&nbsp;</td>
  231.     </tr>
  232.   </table>
  233.  
Aug 18 '08 #1
3 7372
acoder
16,027 Expert Mod 8TB
The problem is, when we mouse over the drop down menu , list box appears in front of the drop down area.
This occurs in IE6 and below and is fixed in IE7. For IE6-, either hide the list box when you mouse over the menu (a bit of a fix), or use iframe shimming (place an iframe underneath the menu).
Aug 18 '08 #2
This occurs in IE6 and below and is fixed in IE7. For IE6-, either hide the list box when you mouse over the menu (a bit of a fix), or use iframe shimming (place an iframe underneath the menu).
Hi,
Thanks for giving this suggestion ..
i tried iframe for list box still the problem appears ....and also i used id for list box to hide but other list items are affecting ..
so what to do .....
Aug 18 '08 #3
acoder
16,027 Expert Mod 8TB
It's not that simple. Search for "iframe shim" and you should find some useful links.
Aug 18 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: LG | last post by:
I have asked before but I did not get all the answer I wanted. Perhaps I explained too bad. I have my site in frames, and the dropdown list is in the 'left' frame, and I have used javascript so...
1
by: middletree | last post by:
For an ASp Intranet app, I have some code that should work, but I am not able to make it happen for some reason, after spending considerable time on this. I am pretty thick when it comes to...
1
by: Dino Buljubasic | last post by:
Hi, I have a toolbar with several buttons on it, one of which is set up to be as a DropDown button. I also have a context menu with menu items assigend to it so when I click that button, my...
4
torquehero
by: torquehero | last post by:
Hi all :) I have created a horizontal navbar using Xara Menumaker. The Menu items have several dropdown menus. Its a javascript. When the mouse cursor is moved over any menu item, a dropdown...
1
by: William Youngman | last post by:
I have a gridview displaying data and would like to use the AJAX dropdown extender so that when the user clicks on a record a dropdown menu will display providing the user with a menu of selections...
2
by: William Youngman | last post by:
We are developing an application that presents data to the user in a gridview and we are using the dropdown extender to give the user a SharePoint 2007 type dropdown menu attached to the cells of a...
4
by: Panna | last post by:
Hey there I am using phpMyAdmin and MySQL to develop a dbase application. I have a dropdown menu on one of the pages which gets populated automatically with data from a table in the database....
1
by: redgoals | last post by:
Hi, I have searched the forum for a similar problem but have been unable to find anything. What i am trying to achieve is a dropdown menu which behaves in the following way: 1, Someone...
1
by: sydd | last post by:
Hi, I was wondering if it's possible to create a dynamic dropdown menu from this code. if($rs->getNumRows() > 0){ $intProjectCount = 1; $htmlOut ="<table width='100%' border='0'...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.